package top.oneit.jdownload.utils;

import javafx.scene.media.AudioClip;

import java.net.URL;

/**
 * @author lingkang
 * @date 2021/12/11
 */
public class AssetsUtils {
    public static void playerDownloadCompleteMusic(){
        URL resource = AssetsUtils.class.getResource("/assets/complete_ding_dong.mp3");
        try {
            AudioClip audioClip = new AudioClip(resource.toURI().toString());
            audioClip.setCycleCount(1);// 播放次数
            audioClip.play();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
